#!./perl #change to perl after perl5 stuff is cleared up # # This script will redirect the client to /channel/day or /channel/night # depending on the time of day (according to the server). # #require "ctime.pl"; # # Play with these variables to meet your needs # $day_path = ""; $night_path = "#night"; $start_day = 7; # Daytime starts at 7 am $start_night = 19; # Nightime starts at 7 pm # # The code starts here # #@day = split (' ', &ctime(date) ); @day = split (' ', `date` ); #@today = split (' ', &ctime(time) ); @today = split (' ', `time` ); ($hour,$min,$sec) = split(':',$today[3]); if ($hour >= $start_night || $hour < $start_day) { # Ok, we're in nightime $redirpath = $night_path; } else { print $file; # It's daytime $redirpath = $day_path; } $file = "day$day[4].html"; print "Content-type: text/html\n\n"; print "
\n"; print "";
print "\n";
#open(OUT,">/opt/WWW/CERN/httpd/docs/program_guide/days/today.html");
#open(DAY,"/opt/WWW/CERN/httpd/docs/program_guide/days/$file");
#while (